#include<iostream>
using namespace std;
class A
{
public:
	virtual void Print(int val = 1) { cout << "A->" << val << endl; }
	virtual void test() { Print(); }
};
class B : public A
{
public:
	void Print(int v = 0) { cout << "B->" << v << endl; }
};

int main()
{
	A aa;
	B bb;
	aa.test();
	bb.test();
	return 0;
}